package io.xxx.xbutler.core.check;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 正数为正常的业务错误码
 * <p>
 * 负数为异常的接口错误码
 */
@Getter
@AllArgsConstructor
public enum CheckError {

    UnknownError(-1, "未知错误"),

    TaskCancelled(100_001, "任务已取消"),
    TaskExpired(100_002, "任务已过期"),

    StoreNotFound(101_001, "门店信息不存在"),
    StoreStatusNotNormal(101_002, "门店状态不正常"),
    StoreAreaNotMatch(101_003, "门店区域与任务区域不匹配"),
    StoreClosed(101_004, "当前时间晚于门店截单时间"),
    StorePushNotEnabled(101_005, "门店推送已关闭"),
    StorePushTimeExceeded(101_106, "当前时间不在门店推送时间范围内"),
    StoreMaxPushQuantityReached(101_107, "推送数量已达门店设置上限"),

    RoomNotFound(102_001, "群信息不存在"),
    RoomBusinessUnitNotMatch(102_002, "群与任务的经营单元不匹配"),

    ProductSaleNotFound(103_001, "商品销售信息为空"),
    ProductSaleLimited(103_002, "商品限售"),
    ProductBusinessUnitNotMatch(103_003, "商品与门店的经营单元不匹配"),

    MaterialNotValid(104_001, "素材无效"),

    ItemsNotValid(105_001, "任务明细为空"),

    VenueProductNotEnough(106_001, "商品数量不足"),
    ;

    private final Integer errorCode;

    private final String errorMessage;
}
